1. Field of the Invention
The invention is directed to a comparator circuit that maps an analog input signal into a digital output signal.
2. Description of the Related Art
A comparator circuit maps an analog input voltage into a digital output signal. To this end, an analog input voltage is compared to a threshold. The value of the digital output signal depends on whether the analog input voltage upwardly or downwardly transgresses the threshold.
In practice (e.g., when using a comparator circuit in a sensor circuit), the analog input voltage has unwanted signals and noise parts. As a rule, these unwanted signal parts can cause the digital output signal to switch, which then, however, no longer corresponds to the actual analog input signal. It is especially high-frequency noise parts in the analog input voltage that cause a frequent switching back and forth in the comparator circuit and cause an erroneous digital output signal. Another problem is thermal drifting, particularly of the comparator circuit, resulting in a precision loss of the mapping of the analog input voltage onto the digital output signal.
In order to avoid these problems, it is known to provide a comparator circuit with a hysteresis (a Schmitt trigger). A precision Schmitt trigger is described, for example, in Tietze/Schenk, Halbleiter-Schaltunastechnik, 9th Edition, Berlin: Springer, page 185. Two comparators whose digital output signals are employed for setting and resetting a flip-flop are employed in this comparator circuit with two thresholds. As a result, the thresholds or switchover levels of the comparator circuit can be set especially precisely.
What is disadvantageous about comparators circuits with hysteresis, however, is the technically caused divergence of the cut-in and cut-out point. The cut-in and cut-out point is the switching of the comparator circuit given upward transgression of a first threshold (first hysteresis threshold) in a first change direction of the analog input signal or upward transgression of a second threshold (second hysteresis threshold) in a second change direction of the analog input signal. In order to be able to filter out unwanted signals in the analog input signal, the cut-in and cut-out points of the hysteresis should lie so far apart that unwanted signals can no longer cause a switching of the comparator circuit. In other words, the size of the hysteresis determines the degree of the noise suppression but also determines the deviation from the desired threshold.
An improvement of the precision Schmitt trigger is disclosed, for example, by U.S. Pat. No. 4,418,332. The Schmitt trigger disclosed therein is a comparator circuit with a hidden hysteresis. This is achieved by using a first comparator without hysteresis and a second comparator with hysteresis. The second comparator generates an unlatch signal for the first comparator. As a result, deviations of the switching points or switchover levels of the comparator circuit from the desired threshold of the comparator circuit are largely avoided since the cut-in point coincides with the cut-out point in the first comparator without hysteresis. By using a blocking or latching, the second comparator prevents a switchover of the digital output signal due to unwanted signals in the analog input signal. Although the hysteresis-conditioned deviation from the desired threshold is largely avoided by this comparator circuit with hidden hysteresis, this design also exhibits a false switching behavior, namely, when an analog input signal is present that just reaches the wanted threshold or switching threshold but does not reach the hysteresis threshold of the second comparator. Moreover, a xe2x80x9cfalsexe2x80x9d digital output signal is retained even given subsequent, great differences between analog input signal and desired switching threshold. Although the probability of this can be reduced by using hysteresis that are selected very small, this condition cannot be completely avoided. Moreover, the malfunction susceptibility via a vis unwanted signals is increased given very small hysteresis.
It is therefore an object of the present invention to provide a comparator circuit that essentially avoids the initially cited problems. This object is achieved by a comparator circuit having the features described below.
The invention comprises a compulsory switching of a digital output signal given upward transgression of an upper hysteresis threshold or given downward transgression of a lower hysteresis threshold by an analog input signal. As a result, the advantages of a hysteresis in view of unwanted signals in the analog input signal are combined such that, with the precision of a comparator without hysteresis, a comparator circuit is created that precisely maps the analog input signal into a digital output signal.
The invention is directed to a comparator circuit that maps an analog input signal into a digital output signal and comprises a threshold as well as an upper and a lower hysteresis threshold. Given transgression of the upper or lower hysteresis threshold by the analog input signal, at least one unlatch signal may be formed that enables the switching of the digital output signal when the analog input signal upwardly transgresses the threshold.
Independently of the at least one unlatch signal, the digital output signal may then be switched when the analog input signal transgresses the upper or lower hysteresis threshold. In other words, the digital output signal may be unconditionally switched when the analog input signal transgresses one of the hysteresis thresholds. This avoids a xe2x80x9cfalsexe2x80x9d switching behavior when the analog input signal in fact transgresses the threshold but does not reach the corresponding hysteresis thresholds. Given the known art that was initially explained, in contrast, the simple unlatching by using a comparator with hysteresis only enables a switching given upward transgression of a hysteresis threshold, as a result of which the digital output signal is only an inexact map of the analog input signal. In particular, switching is carried out in the invention given great differences between the analog input signal and the threshold.